/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package tdd;

import java.util.Stack;

/**
 *
 * @author eyrie.chen
 */
class Concat implements Command{

    public void invoke(Stack stack) {
        String tail = (String) stack.pop();
        String head = (String) stack.pop();
        stack.push(head + tail);
    }
    @Override
    public String toString(){
        return "CMD concat";
    }

}
